#include <iostream>
#include <stdlib.h>
using namespace std;

static void print_bytes(const void *mem, int size) {
    for (int i = 0; i < size; ++i) {
        const char ch = *((char*)mem + i);
        for (int i = 7; i >= 0; --i) {
            cout << ((ch & (1 << i)) ? '1' : '0');
        }
        cout << " ";
    }
}

template<typename T>
static void print_bytes(T obj) {
    print_bytes((void*)&obj, sizeof(obj));
}

int main() {
    cout << "Enter number: ";
    double num;
    cin >> num;
    print_bytes(num);
    return 0;
}
